package com.shuangti;

import java.util.Scanner;

public class FilmTest {
    public static void main(String[] args) {
        Film f1 = new Film(001,"哪吒",58.8);
        Film f2= new Film(002,"哈利波特",48.6);
        Film f3=new Film(003,"唐人街探案",68.8);

        System.out.println("-------------电影信息系统------------");
        System.out.println("1.查询全部电影信息");
        System.out.println("2.根据电影id查询电影详情");
        System.out.println("请您选择您要操作的功能");
        System.out.println("请输入1或2");
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        if(number==1){
            System.out.println(f1);
            System.out.println(f2);
            System.out.println(f3);
        }
        else if(number==2){
            System.out.println("请输入您想查询的电影id");
            int id = sc.nextInt();
            if(id==001){
                System.out.println(f1);
            }
            if(id==002){
                System.out.println(f2);
            }
            if(id==003){
                System.out.println(f3);
            }
        }
    }
}
